package com.xur.springboot.controller;

import com.xur.springboot.entity.user_details;
import com.xur.springboot.service.user_detailService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class user_detailController {

    @Resource
    private user_detailService user_detailService;


    @GetMapping("/user_detailById")
    public List<user_details> queryUser_detailById(@RequestParam int id) {
        System.out.println("根据user_id查询的id号："+id);
        return user_detailService.queryUser_detailById(id);
    }

    @GetMapping("/queryIdByuser_id")
    public int queryIdByuser_id(@RequestParam int user_id) {
        System.out.println("根据user_id查询的user_id号："+user_id);
        return user_detailService.queryIdByuser_id(user_id);
    }
    @GetMapping("/queryIdBycompanies_id")
    public List<Integer> queryIdBycompanies_id(@RequestParam int companies_id) {
        System.out.println("根据companies_id查询的companies_id号："+companies_id);
        return user_detailService.queryIdBycompanies_id(companies_id);
    }

}
